n = 10
ans = []
end = []
path = []

def backtracking(n):
    if n == 0:
        end.append(path.copy())
        return
    for i in range(1, n + 1):
        path.append(i)
        backtracking(n - i)
        path.pop()
    return


backtracking(n)
for i in end:
    tem = 1
    for j in i:
        tem *= j
    print("%2d" %tem, end="  ")
    print(i)